<%@page import="systems.AdsSystem"%>
<%@page import="helpers.LanguageHelper"%>
<%@page import="helpers.UrlHelper"%>
<%
String article = (String) request.getAttribute("article");
String rewrite = (String) request.getAttribute("rewrite");
LanguageHelper translate = (LanguageHelper) request.getAttribute("translate");

//Set content for seo
String nameServer = UrlHelper.getDomainServer(request);
String title = translate.getString("rewrite_seo_title") + " - " + nameServer;
String description = translate.getString("rewrite_seo_description");
String keywords = translate.getString("rewrite_seo_keywords");
String url = UrlHelper.getServerUrl(request) + "/rewriter";
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>
            
            <div id="mainContent" class="left">
            	<div id="articleRewritePage">
                	<h3 class="title"><%=translate.getString("rewrite_title")%></h3>
                    <p class="intro"><%=translate.getString("rewrite_intro")%></p>
                    <div class="adv">
						<%=AdsSystem.getAds468x15() %>
	                </div>
					<form method="post" action="" class="formStyle">                    	                                            
                        <div>
                        	<label><%=translate.getString("label_original")%> (<%=translate.getString("required")%>)</label>
                            <textarea name="article"><%=article %></textarea>
                        </div>
                        <div class="clearafter">
                        	<button type="submit"><%=translate.getString("rewrite")%></button>
                        	<div class="right">
                        		<%=AdsSystem.getAds468x60() %>
                        	</div>
                        </div>
                        
                        
                        <div>
                        	<label><%=translate.getString("label_rewritten")%></label>
                            <textarea readonly="readonly"><%=rewrite %></textarea>
                        </div>
                    </form>
                </div>
            </div>
            
            <jsp:include page="/elements/right.jsp" />
            
            <div class="clearbreak"></div>
<jsp:include page="/layouts/footer.jsp" />